<?php

namespace app\api\logic;

use app\common\model\Advertising as AdvertisingModel;

class Advertising
{
    /**
     * 查询列表
     */
    public function getList(): array
    {
        //查询条件
        $where = [['is_show', '=', 1]];

        //输出字段
        $list = app(AdvertisingModel::class)->where($where)->limit(10)->select();

        //返回
        return $list ? $list->toArray() : [];
    }
}
